package top.juntower.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.juntower.dao.UserMapper;
import top.juntower.pojo.GameCollection;
import top.juntower.pojo.HistoryInformation;
import top.juntower.pojo.User;
import top.juntower.pojo.vo.UserVo;
import top.juntower.service.UserService;

import java.util.List;
import java.util.Map;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;


    @Override
    public User loginJudge(Map map) {
        return userMapper.loginJudge(map);
    }

    @Override
    public UserVo simpleInformation(Integer uId) {
        return userMapper.simpleInformation(uId);
    }

    @Override
    public int updateuserimg(Map map) {
        return userMapper.updateuserimg(map);
    }

    @Override
    public int updateUserName(Map map) {
        return userMapper.updateUserName(map);
    }

    @Override
    public int isRegister(String uPhone) {
        return userMapper.isRegister(uPhone);
    }

    @Override
    public int register(Map map) {
        return userMapper.register(map);
    }

    @Override
    public List<GameCollection> GameCollectionInformation(Integer pageNum, Integer pageSize, Integer uId) {
        return userMapper.GameCollectionInformation(pageNum, pageSize, uId);
    }

    @Override
    public int addHistory(Map map) {
        return userMapper.addHistory(map);
    }

    @Override
    public int deleteHistory(Integer hId) {
        return userMapper.deleteHistory(hId);
    }

    @Override
    public int deleteUserIdHistory(Integer uId) {
        return userMapper.deleteUserIdHistory(uId);
    }

    @Override
    public int deleteMoreUserIdHistory(List<Integer> list) {
        return userMapper.deleteMoreUserIdHistory(list);
    }

    @Override
    public List<HistoryInformation> history(Integer uId, Integer pageNum, Integer pageSize) {
        return userMapper.history(uId, pageNum, pageSize);
    }

    @Override
    public int updatePassword(Map map) {
        return userMapper.updatePassword(map);
    }

    @Override
    public int createFeedback(Map map) {
        return userMapper.createFeedback(map);
    }


}
